package com.zheng.pay.dao.model;

import java.io.Serializable;
import java.util.Date;

public class PayMchInfo implements Serializable {
    /**
     * 商户ID
     *
     * @mbg.generated
     */
    private String mchid;

    /**
     * 名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 类型
     *
     * @mbg.generated
     */
    private String type;

    /**
     * 请求私钥
     *
     * @mbg.generated
     */
    private String reqkey;

    /**
     * 响应私钥
     *
     * @mbg.generated
     */
    private String reskey;

    /**
     * 商户状态,0-停止使用,1-使用中
     *
     * @mbg.generated
     */
    private Byte state;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Date createtime;

    /**
     * 更新时间
     *
     * @mbg.generated
     */
    private Date updatetime;

    private static final long serialVersionUID = 1L;

    public String getMchid() {
        return mchid;
    }

    public void setMchid(String mchid) {
        this.mchid = mchid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getReqkey() {
        return reqkey;
    }

    public void setReqkey(String reqkey) {
        this.reqkey = reqkey;
    }

    public String getReskey() {
        return reskey;
    }

    public void setReskey(String reskey) {
        this.reskey = reskey;
    }

    public Byte getState() {
        return state;
    }

    public void setState(Byte state) {
        this.state = state;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mchid=").append(mchid);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", reqkey=").append(reqkey);
        sb.append(", reskey=").append(reskey);
        sb.append(", state=").append(state);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayMchInfo other = (PayMchInfo) that;
        return (this.getMchid() == null ? other.getMchid() == null : this.getMchid().equals(other.getMchid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getReqkey() == null ? other.getReqkey() == null : this.getReqkey().equals(other.getReqkey()))
            && (this.getReskey() == null ? other.getReskey() == null : this.getReskey().equals(other.getReskey()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMchid() == null) ? 0 : getMchid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getReqkey() == null) ? 0 : getReqkey().hashCode());
        result = prime * result + ((getReskey() == null) ? 0 : getReskey().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        return result;
    }
}